#include "DeltaTimer.hpp"
#include <time.h>

using namespace Typhoon;

DeltaTimer::DeltaTimer(){
}

DeltaTimer::~DeltaTimer(){
}

float DeltaTimer::GetDeltaTime() {
	clock_t now = clock();
		
	float time = float(now - lastTime) / float(CLOCKS_PER_SEC);
	lastTime = now;
	if (time>1) time = 1;

	return time;
}